<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2025/2/10
  Time: 12:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>Title</title>
</head>
<body>
<%
  String value = "";
  Cookie[] cookies = request.getCookies();
  if(cookies!=null){
    for (Cookie cookie : cookies) {
     if(cookie!=null&&cookie.getName().equals("uname")){
       value=cookie.getValue();
       break;
     }
    }
  }
%>

<br>获取cookie的值,ket=uname,value=<%=value%>

<br>获取session的值,欢迎:${sessionScope.username}
</body>
</html>
